Hi,
I have a cmake file with 2 targets defined inside.
For each target I have to specify a different scatter file for my linker
so I want to use :
if (TARGET target_1)
SET (LINKER_SCATTER_FILE file_1)
else ()
SET (LINKER_SCATTER_FILE file_2)
endif ()
add_executable(target_1 ${srcs_target_1})
add_executable(target_2 ${srcs_target_2})
But if I'm calling cmake from my IDE to build my target using the --target
command line option
does it set the TARGET variable ? If not the case how I can link the targer
name from the command line to my IF statement ?
Regards,
Yann.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake