I'm working with a CMakeLists.txt file I didn't create, so this may be a dumb 
question, but that won't stop me from asking it!

We're using a System z cross-compiler called Dignus. I have it all working, but 
when we merged back into the SVN trunk, the PROJECT() statement became an issue.

CMake is invoked thus:
        cmake -DCMAKE_TOOLCHAIN_FILE:string=".\zosport.cmake" -G"Unix 
Makefiles" .\

zosport.cmake contains (among other things):
        SET(CMAKE_SYSTEM_NAME "IBM_ZOS")

Through some MESSAGE() statements, I've convinced myself that zosport.cmake 
gets loaded by the PROJECT() statement. BUT I need to customize the PROJECT() 
statement based on the environment. What I have now is:
        
        project(vtk-core C)
        if(CMAKE_SYSTEM_NAME STREQUAL "IBM_ZOS")
           project(vtk-core C ASM_DIGNUS)
        endif()

This seems to work OK, but I wasn't sure if it was evil for some reason, or if 
there was a preferred approach.

...phsiii

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to