From c477360dbf45070ff80ad8949a66429fe1ae8414 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 15 May 2010 01:24:41 -0400 Subject: Removed empty.c, instead have cmake create a new empty file when it needs it and deletes it later --- CMakeLists.txt | 6 +++++- empty.c | 0 2 files changed, 5 insertions(+), 1 deletion(-) delete mode 100644 empty.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ee4c13d5..aabbc4fc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,9 +105,13 @@ if(CMAKE_COMPILER_IS_GNUCXX) if(DEFAULT_LIBRARY_DIRS) remove_list_duplicates(DEFAULT_LIBRARY_DIRS) endif(DEFAULT_LIBRARY_DIRS) + # Create a temporary file to test for the default include directories + FILE(WRITE empty.cpp "") # Next, we look for the compiler's default include directories # Run the command to find the default include directories - execute_process(COMMAND ${CMAKE_C_COMPILER} -v -x c++ -E ${CMAKE_CURRENT_SOURCE_DIR}/empty.c ERROR_VARIABLE LINES OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${CMAKE_C_COMPILER} -v -x c++ -E ${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp ERROR_VARIABLE LINES OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE) + # Remove the empty file, it is no longer needed + FILE(REMOVE empty.cpp) # Convert the new lines to semicolons string(REGEX REPLACE "\n" ";" LINES ${LINES}) # Temporary variable saying if we are in the search list or not diff --git a/empty.c b/empty.c deleted file mode 100644 index e69de29bb..000000000 -- cgit