Skip to content

Commit

Permalink
Let cmake generate the compile commands json file
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-guyot-infomaniak committed Sep 19, 2024
1 parent 8714c89 commit e2c3106
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions infomaniak-build-tools/windows/build-drive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,20 @@ if (!(Test-Path "$vfsDir\vfs.dll") -or $ext)
# #
#################################################################################################

$msvc_bin_path = "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin"
$compiler_path = "$msvc_bin_path/Hostx64/x64/cl.exe"

$args = @("'-GNinja'")
$args += ("'-DCMAKE_BUILD_TYPE=$buildType'")
$args += ("'-DCMAKE_INSTALL_PREFIX=$installPath'")
$args += ("'-DCMAKE_PREFIX_PATH=$installPath'")

$flags = @(
"'-DCMAKE_EXPORT_COMPILE_COMMANDS=1'",
"'-DCMAKE_MAKE_PROGRAM=C:\Qt\Tools\Ninja\ninja.exe'",
"'-DQT_QMAKE_EXECUTABLE:STRING=C:\Qt\Tools\CMake_64\bin\cmake.exe'",
"'-DCMAKE_C_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe'",
"'-DCMAKE_CXX_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe'",
"'-DCMAKE_C_COMPILER:STRING=$compiler_path'",
"'-DCMAKE_CXX_COMPILER:STRING=$compiler_path'",
"'-DAPPLICATION_UPDATE_URL:STRING=https://www.infomaniak.com/drive/update/desktopclient'",
"'-DAPPLICATION_VIRTUALFILE_SUFFIX:STRING=kdrive'",
"'-DBIN_INSTALL_DIR:PATH=$path'",
Expand Down

0 comments on commit e2c3106

Please sign in to comment.