[CMake] -DCMAKE_BUILD_TYPE=Release breaks build process
Bernhard Seckinger
bernhard.seckinger at gmx.de
Thu Mar 2 07:01:46 EST 2017
Hi Jan,
> just a general idea as how to approach this:
> - make a clean cmake directory and try again, or at least remove the
> CMakeCache.txt
I'm allready doing this all the time... :-)
> - if you use the make generator, add -DCMAKE_VERBOSE_MAKEFILE=ON when
> calling cmake to know what exactly is being used during build
Basically it's (works)
/usr/bin/gdc -I.. -fversion=slang -oCMakeFiles/starbattle.dir/__/puzzle
-c /home/berni/Croco/Entwicklung/Croco/types/puzzle.d
[...]
/usr/bin/gdc CMakeFiles/starbattle.dir/starbattle
CMakeFiles/starbattle.dir/starbattle_check_puzzle
CMakeFiles/starbattle.dir/starbattle_check_solution
CMakeFiles/starbattle.dir/__/puzzle
CMakeFiles/starbattle.dir/__/puzzle_options
CMakeFiles/starbattle.dir/__/puzzle_unittest
CMakeFiles/starbattle.dir/__/spf_tools CMakeFiles/starbattle.dir/__/puzzle_io
CMakeFiles/starbattle.dir/__/puzzle_timer CMakeFiles/starbattle.dir/__/slang
-ostarbattle -L/usr/lib/gcc/x86_64-linux-gnu/6 ../libslang_wrapper.o.a
-lslang -lc
vs. (does not work)
/usr/bin/gdc -O3 -fomit-frame-pointer -fweb -frelease -finline-functions
-I.. -fversion=slang -oCMakeFiles/starbattle.dir/__/puzzle
-c /home/berni/Croco/Entwicklung/Croco/types/puzzle.d
[...]
/usr/bin/gdc -O3 -fomit-frame-pointer -fweb -frelease -finline-functions
CMakeFiles/starbattle.dir/starbattle
CMakeFiles/starbattle.dir/starbattle_check_puzzle
CMakeFiles/starbattle.dir/starbattle_check_solution
CMakeFiles/starbattle.dir/__/puzzle
CMakeFiles/starbattle.dir/__/puzzle_options
CMakeFiles/starbattle.dir/__/puzzle_unittest
CMakeFiles/starbattle.dir/__/spf_tools CMakeFiles/starbattle.dir/__/puzzle_io
CMakeFiles/starbattle.dir/__/puzzle_timer CMakeFiles/starbattle.dir/__/slang
-ostarbattle -L/usr/lib/gcc/x86_64-linux-gnu/6 ../libslang_wrapper.o.a
-lslang -lc
One can even remove "-fomit-frame-pointer -fweb -frelease -finline-functions"
and set -O1 instead of -O3 to get the same result.
And that's the output of the last call:
CMakeFiles/starbattle.dir/starbattle_check_puzzle: In function
`_DT256_D25starbattle_check_solution25Starbattle_Check_Solution16extract_solutionMFHAyaAyaZv':
starbattle_check_puzzle.d:
(.text._DT256_D25starbattle_check_solution25Starbattle_Check_Solution16extract_solutionMFHAyaAyaZv
[_DT256_D25starbattle_check_solution25Starbattle_Check_Solution16extract_solutionMFHAyaAyaZv]
+0x8e): undefined reference to
`_D25starbattle_check_solution25Starbattle_Check_Solution16extract_solutionMFHAyaAyaZ12__dgliteral2MFNaNbNiNfZAxa'
CMakeFiles/starbattle.dir/starbattle_check_puzzle: In function
`_DT256_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv':
starbattle_check_puzzle.d:
(.text._DT256_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv
[_DT256_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv]+0x12): undefined
reference to
`_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZ12__dgliteral2MFNaNbNiNfZAya'
starbattle_check_puzzle.d:
(.text._DT256_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv
[_DT256_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv]+0xbd): undefined
reference to
`_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZ12__dgliteral3MFNaNbNiNfZAya'
CMakeFiles/starbattle.dir/starbattle_check_solution: In function
`_DT96_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv':
starbattle_check_solution.d:
(.text._DT96_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv
[_DT96_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv]+0xf): undefined
reference to
`_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZ12__dgliteral2MFNaNbNiNfZAya'
starbattle_check_solution.d:
(.text._DT96_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv
[_DT96_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZv]+0xba): undefined
reference to
`_D10starbattle10Starbattle14extract_puzzleMFHAyaAyaZ12__dgliteral3MFNaNbNiNfZAya'
collect2: error: ld returned 1 exit status
Berni
--
-- Meine Rätselwebseite: www.croco-puzzle.com
More information about the CMake
mailing list