Hi,
I am using visual studio. We are using "visual studio message compiler"
which compiles a ".mc" file and generate ".rc and .h" files as output. Our
project has a dependency on this ".h" file. What we want is to invoke
"message compiler" whenever the ".mc" file changes.
To achieve this I have used "add_custom_command" as given below
SET (MY_SRC Event_log.h other.cpp other1.cpp)
ADD_EXECUTABLE(MyExe ${MY_SRC }
add_custom_command(OUTPUT Event_log.h COMMAND mc Event_log.mc
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS Event_log.mc)
Whenever I run the build command, this causes the "mc" to rerun each time
(even if the .mc file is not changed), and in effect recompiling a major
portion of my project.
May I know what am I doing wrong here?
Thanks,
Lloyd
--
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://www.cmake.org/mailman/listinfo/cmake