[CMake] Passing preprocessor defs to VS2003
Mike Jackson
imikejackson at gmail.com
Mon May 14 11:54:08 EDT 2007
Funny,.. that was a typo in the email but was correct in the
CMakeLists.txt file. I ended up blowing away the build directory and
regenerating the project file. Now it seems to have taken in the VS
project. Odd.
Thanks for the sanity check,.
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On May 14, 2007, at 11:50 AM, Bill Hoffman wrote:
> Mike Jackson wrote:
>> This is going to be a hopefully simple question.
>>
>> I need to pass a simple preprocessor definition to the compiler
>> based on if the system is windows. So I created a simple option:
>>
>> OPTION(WIN_LARGE_FILE_SUPPORT "Description" ON)
>> IF (WIN_LARGE_FILE_SUPPORT)
>> ADD_DEFINITIONS("-D WIN_LARGE_FILE_SUPPORT")
>> ENDIF (WIN_LARGE_FILE_SUPPORT)
>>
>> But Visual studio is adding it as just "WIN_LARGE_FILE_SUPPORT"
>> and not "-D WIN_LARGE_FILE_SUPPORT". So what am I doing wrong?
>>
>> This is with Cmake 2.4.6 and Visual Studio 2003 .Net
> Remove the space. -DWIN_LARGE_FILE_SUPPORT
>
> -Bill
>
More information about the CMake
mailing list