cgold-examples / fruits

Example for http://cgold.readthedocs.io/en/latest/tutorials/collecting-sources/project-layout.html
BSD 2-Clause "Simplified" License
7 stars 2 forks source link

broken build on VS2015 #3

Open kumaakh opened 5 years ago

kumaakh commented 5 years ago

git cloned cmake -G "Visual Studio 15 2017 Win64" -S base -B _build opened _build/fruits.sln in VS 2017 rebuild solution got following

Severity Code Description Project File Line Suppression State Error C1041 cannot open program database 'C:\akhil\git\fruits_build\pdb-files\Debug\vc141.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS fruits_quick_meal C:\akhil\git\fruits\example\fruits\quick_meal\main.cpp 1
Error C1041 cannot open program database 'C:\akhil\git\fruits_build\pdb-files\Debug\vc141.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS fruits_breakfast C:\akhil\git\fruits\app\fruits\breakfast\flatware\Teaspoon.cpp 1
Error C1041 cannot open program database 'C:\akhil\git\fruits_build\pdb-files\Debug\vc141.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS fruits_skin_off C:\akhil\git\fruits\lib\fruits\rosaceae\Pear.cpp 1
Error C1041 cannot open program database 'C:\akhil\git\fruits_build\pdb-files\Debug\vc141.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS fruits_breakfast C:\akhil\git\fruits\app\fruits\breakfast\main.cpp 1
Error C1041 cannot open program database 'C:\akhil\git\fruits_build\pdb-files\Debug\vc141.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS fruits_check_tropical C:\akhil\git\fruits\lib\fruits\tropical\unittest\Avocado.cpp 1
Error C1041 cannot open program database 'C:\akhil\git\fruits_build\pdb-files\Debug\vc141.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS fruits_vegan_party C:\akhil\git\fruits\example\fruits\vegan_party\main.cpp 1

Where should I add /FS in the CMakeList.txt ?

kumaakh commented 5 years ago

Note this is only an issue for the Debug config, Release builds fine as it not configured to produce the *.pdb files

ruslo commented 5 years ago

broken build on VS2015

Visual Studio 15 2017 Win64

Doesn't match

cmake -G "Visual Studio 15 2017 Win64" -S base -B _build

There is no "base" directory, also doesn't match "'C:\akhil\git\fruits_build\pdb-files\Debug\vc141.pdb" path.

Do step by step carefully:

git clone https://github.com/cgold-examples/fruits
cmake -S fruits -B _builds -DHUNTER_STATUS_DEBUG=ON -G "Visual Studio 15 2017 Win64"
cmake --build _builds --config Debug