← All posts tagged cmake

arrowdodger

Как юзать CMake и VS (сперто со стаковерфлоу):
well, we use cmake and VS to develop. And after the shock (from my side when I joined the company one year ago) I like it way better to be forced to write down your cmakelist.txt. It makes you THINK about the structure of your project before you shoot into the blue (aka "rmt -> new file" ). So we do it around. Add files into cmakelist first and configure/generate the .sln files via cmake

arrowdodger

Во! Запилил!
arr: ~/projects/tests/cmake/haskell/build> cmake ..
— Check for working Haskell compiler: /usr/local/bin/ghc
— Check for working Haskell compiler: /usr/local/bin/ghc — works
— Configuring done
— Generating done
— Build files have been written to: /home/arr/projects/tests/cmake/haskell/build
arr: ~/projects/tests/cmake/haskell/build> make
Scanning dependencies of target test
[100%] Building Haskell object CMakeFiles/test.dir/Main.hs.o
Linking Haskell executable test
[100%] Built target test
arr: ~/projects/tests/cmake/haskell/build> ./test
Hello CMake!
arr: ~/projects/tests/cmake/haskell/build>

arrowdodger

Трындец, ну кто там пишет маны по модулям у них? Оказывается, чтобы модуль все таки юзал BOOST_ROOT для поиска буста и игнорировал дефолтные пути мало просто задефайнить BOOST_ROOT. Надо еще задефайнить Boost_NO_SYSTEM_PATHS (да, да, с lowercase Boost, иначе не заработает) и об этом в мане ни слова. Об этом вообще нигде ни слова, кроме варнинга на винде (!!!).