Rename files from main.cpp to more meaningful names.
Because the main file for the dummy-executable and the actual compile test were both called main.cpp, they were overwriting each other during in-source builds.
This commit is contained in:
parent
ca7fb14f9b
commit
f0a1065393
|
@ -11,6 +11,6 @@ add_subdirectory(add_definitions_command)
|
|||
add_subdirectory(target_prop)
|
||||
add_subdirectory(add_definitions_command_with_target_prop)
|
||||
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp" "int main(int, char **) { return 0; }\n")
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummyexecutable.cpp" "int main(int, char **) { return 0; }\n")
|
||||
|
||||
add_executable(CompileDefinitions "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
|
||||
add_executable(CompileDefinitions "${CMAKE_CURRENT_BINARY_DIR}/dummyexecutable.cpp")
|
||||
|
|
|
@ -4,4 +4,4 @@ project(add_definitions_command)
|
|||
add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun -DCMAKE_IS_="Fun" -DCMAKE_IS_REALLY="Very Fun")
|
||||
add_definitions(-DCMAKE_IS_="Fun" -DCMAKE_IS_REALLY="Very Fun" -DCMAKE_IS_FUN -DCMAKE_IS=Fun)
|
||||
|
||||
add_executable(add_definitions_command_executable ../main.cpp)
|
||||
add_executable(add_definitions_command_executable ../compiletest.cpp)
|
||||
|
|
|
@ -3,7 +3,7 @@ project(add_definitions_command_with_target_prop)
|
|||
|
||||
add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun)
|
||||
|
||||
add_executable(add_definitions_command_with_target_prop_executable ../main.cpp)
|
||||
add_executable(add_definitions_command_with_target_prop_executable ../compiletest.cpp)
|
||||
|
||||
set_target_properties(add_definitions_command_with_target_prop_executable PROPERTIES COMPILE_DEFINITIONS CMAKE_IS_="Fun")
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
project(target_prop)
|
||||
|
||||
add_executable(target_prop_executable ../main.cpp)
|
||||
add_executable(target_prop_executable ../compiletest.cpp)
|
||||
|
||||
set_target_properties(target_prop_executable PROPERTIES COMPILE_DEFINITIONS CMAKE_IS_FUN)
|
||||
|
||||
|
|
Loading…
Reference in New Issue