This is an automated email from the ASF dual-hosted git repository.
archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 419a8ab050 CMakeLists.txt: warning D9002 on windows + msvc
419a8ab050 is described below
commit 419a8ab050d596ee60029454fb6479efd8fbd2ab
Author: simbit18 <[email protected]>
AuthorDate: Wed Aug 21 17:45:10 2024 +0200
CMakeLists.txt: warning D9002 on windows + msvc
Resolve compile warning
cl : command line warning D9002: ignoring unknown option
'-fmacro-prefix-map=
---
CMakeLists.txt | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 97a6344557..f41122b659 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -528,11 +528,13 @@ endif()
# failure logs more deterministic and most importantly makes builds more
# deterministic. Debuggers usually have a path mapping feature to ensure the
# files are still found.
-if(CONFIG_OUTPUT_STRIP_PATHS)
- add_compile_options(-fmacro-prefix-map=${NUTTX_DIR}=)
- add_compile_options(-fmacro-prefix-map=${NUTTX_APPS_DIR}=)
- add_compile_options(-fmacro-prefix-map=${NUTTX_BOARD_ABS_DIR}=)
- add_compile_options(-fmacro-prefix-map=${NUTTX_CHIP_ABS_DIR}=)
+if(NOT MSVC)
+ if(CONFIG_OUTPUT_STRIP_PATHS)
+ add_compile_options(-fmacro-prefix-map=${NUTTX_DIR}=)
+ add_compile_options(-fmacro-prefix-map=${NUTTX_APPS_DIR}=)
+ add_compile_options(-fmacro-prefix-map=${NUTTX_BOARD_ABS_DIR}=)
+ add_compile_options(-fmacro-prefix-map=${NUTTX_CHIP_ABS_DIR}=)
+ endif()
endif()
add_definitions(-D__NuttX__)