diff options
author | Adam <Adam@drink-coca-cola.info> | 2010-05-15 01:24:41 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-18 21:01:55 -0400 |
commit | c477360dbf45070ff80ad8949a66429fe1ae8414 (patch) | |
tree | cfa33d2eb49d9e1672a747868e1b67a07a5957d4 | |
parent | ee57f5719301c3883afcffe5970746f378960917 (diff) |
Removed empty.c, instead have cmake create a new empty file when it needs it and deletes it later
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | empty.c | 0 |
2 files changed, 5 insertions, 1 deletions
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 --- a/empty.c +++ /dev/null |