Restrict make-specific targets to only be added with make
This commit is contained in:
parent
2375f2c66b
commit
e40ed4f94e
@ -138,15 +138,18 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
endif()
|
endif()
|
||||||
#
|
#
|
||||||
set(CMAKE_CXX_FLAGS "-Wall ${GCC_EXTRA_OPTIONS} -pedantic -Wno-long-long ${CMAKE_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "-Wall ${GCC_EXTRA_OPTIONS} -pedantic -Wno-long-long ${CMAKE_CXX_FLAGS}")
|
||||||
#
|
|
||||||
add_custom_target(debuggable $(MAKE) clean
|
### Make specific
|
||||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
|
if(${CMAKE_BUILD_TOOL} STREQUAL make OR ${CMAKE_BUILD_TOOL} STREQUAL gmake)
|
||||||
COMMENT "Adjusting settings for debug compilation"
|
add_custom_target(debuggable $(MAKE) clean
|
||||||
VERBATIM)
|
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
|
||||||
add_custom_target(releasable $(MAKE) clean
|
COMMENT "Adjusting settings for debug compilation"
|
||||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
|
VERBATIM)
|
||||||
COMMENT "Adjusting settings for release compilation"
|
add_custom_target(releasable $(MAKE) clean
|
||||||
VERBATIM)
|
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
|
||||||
|
COMMENT "Adjusting settings for release compilation"
|
||||||
|
VERBATIM)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Microsoft VisualC++ specialities
|
# Microsoft VisualC++ specialities
|
||||||
|
Loading…
Reference in New Issue
Block a user