How to using gui nana library with biicode - biicode

I am trying to compile my code with nana gui library using Biicode.
https://www.biicode.com/qiangwu/qiangwu/nana/master/0/biicode.conf
# Biicode configuration file migrated from old config files
[requirements]
qiangwu/nana: 0
[parent]
[paths]
[dependencies]
include/nana/config.hpp + build/cmake/config.hpp
[mains]
[hooks]
[includes]
[data]
After command bii build
Output is:
H:\na4\nana>bii build
INFO: Processing changes...
WARN: user/nana/biicode.conf, [dependencies] include/nana/config.hpp + build/cmake/config.hpp
There are no files matching pattern include/nana/config.hpp
Building: "cmake" --build .
BLOCK: qiangwu/nana
-----------------------------------------------------------
CMake Error at H:/na4/nana/bii/deps/qiangwu/nana/CMakeLists.txt:19 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Error copying file (if different) from "H:/na4/nana/bii/deps/qiangwu/nana/build/cmake/config.hpp" to "H:/na4/nana/bii/deps/qiangwu/nana/include/nana/".
+ LIB: qiangwu_nana
BLOCK: user/nana
-----------------------------------------------------------
+ LIB: user_nana
+ EXE: user_nana_main
-- Configuring incomplete, errors occurred!
See also "H:/na4/nana/bii/build/CMakeFiles/CMakeOutput.log".
See also "H:/na4/nana/bii/build/CMakeFiles/CMakeError.log".
mingw32-make.exe: *** [cmake_check_build_system] Error 1
ERROR: Build failed
CmakeLists.txt:
if(NOT BIICODE)
project(nana)
cmake_minimum_required(VERSION 2.8)
else()
set(LIB_SRC ${BII_LIB_SRC})
foreach(cpp ${BII_LIB_SRC})
if(${cpp} MATCHES "(include/nana|source)/detail/[A-Za-z0-9_]+/.+$")
list(APPEND trash_files ${cpp})
endif()
endforeach()
list(REMOVE_ITEM BII_LIB_SRC ${trash_files})
endif()
Line 19 is : " list(REMOVE_ITEM BII_LIB_SRC ${trash_files})"

It seems it is not biicode related, but CMake related. Your ${trash_files} variable is actually empty, and then the REMOVE_ITEM list function fails. Check this code in a regular CMakeLists.txt:
SET(MY_VAR a b c)
SET(TRASH_FILES )
SET(MY_LIST a b c d)
foreach(cpp ${MY_VAR})
if(${cpp} MATCHES d)
list(APPEND trash_files ${cpp})
endif()
endforeach()
list(REMOVE_ITEM MY_LIST ${trash_files})
If you think that a variable might be empty in such operations, protect that code with a conditional:
if(trash_files)
list(REMOVE_ITEM MY_LIST ${trash_files})
endif()

Resently it was an update addresing this.
In GitHub you will need to use the branch develop

Related

CMake Error at runner/CMakeLists.txt:9 (add_executable): ( Flutter windows ) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 days ago.
Improve this question
I was working on a flutter project for android and I wanted to use it for windows to then I run it on windows x64 from vs code then I got that error
Launching lib\main.dart on Windows in debug mode...
CMake Error at runner/CMakeLists.txt:9 (add_executable):
Cannot find source file:
runner.exe.manifest
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
CMake Error at runner/CMakeLists.txt:9 (add_executable):
No SOURCES given to target: school_manager
CMake Generate step failed. Build files cannot be regenerated correctly.
Exception: Unable to generate build files
Exited (sigterm)
Here is my C:\flutter projects\school_manager\windows\flutter\CMakeLists.txt:
# This file controls Flutter-level build steps. It should not be edited.
cmake_minimum_required(VERSION 3.14)
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
# Configuration provided via flutter tool.
include(${EPHEMERAL_DIR}/generated_config.cmake)
# TODO: Move the rest of this into files in ephemeral. See
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
# Published to parent scope for install step.
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
list(APPEND FLUTTER_LIBRARY_HEADERS
"flutter_export.h"
"flutter_windows.h"
"flutter_messenger.h"
"flutter_plugin_registrar.h"
"flutter_texture_registrar.h"
)
list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
add_library(flutter INTERFACE)
target_include_directories(flutter INTERFACE
"${EPHEMERAL_DIR}"
)
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
add_dependencies(flutter flutter_assemble)
# === Wrapper ===
list(APPEND CPP_WRAPPER_SOURCES_CORE
"core_implementations.cc"
"standard_codec.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
"plugin_registrar.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_APP
"flutter_engine.cc"
"flutter_view_controller.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
# Wrapper sources needed for a plugin.
add_library(flutter_wrapper_plugin STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
)
apply_standard_settings(flutter_wrapper_plugin)
set_target_properties(flutter_wrapper_plugin PROPERTIES
POSITION_INDEPENDENT_CODE ON)
set_target_properties(flutter_wrapper_plugin PROPERTIES
CXX_VISIBILITY_PRESET hidden)
target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
target_include_directories(flutter_wrapper_plugin PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_plugin flutter_assemble)
# Wrapper sources needed for the runner.
add_library(flutter_wrapper_app STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_APP}
)
apply_standard_settings(flutter_wrapper_app)
target_link_libraries(flutter_wrapper_app PUBLIC flutter)
target_include_directories(flutter_wrapper_app PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_app flutter_assemble)
# === Flutter tool backend ===
# _phony_ is a non-existent file to force this command to run every time,
# since currently there's no way to get a full input/output list from the
# flutter tool.
set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
add_custom_command(
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
${PHONY_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"
${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
)
and here is my C:\flutter projects\school_manager\windows\runner\CMakeLists.txt:
cmake_minimum_required(VERSION 3.14)
project(runner LANGUAGES CXX)
# Define the application target. To change its name, change BINARY_NAME in the
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
# work.
#
# Any new source files that you add to the application should be added here.
add_executable(${BINARY_NAME} WIN32
"flutter_window.cpp"
"main.cpp"
"utils.cpp"
"win32_window.cpp"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
"Runner.rc"
"runner.exe.manifest"
)
# Apply the standard set of build settings. This can be removed for applications
# that need different build settings.
apply_standard_settings(${BINARY_NAME})
# Disable Windows macros that collide with C++ standard library functions.
target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
# Add dependency libraries and include directories. Add any application-specific
# dependencies here.
target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
# Run the Flutter tool portions of the build. This must not be removed.
add_dependencies(${BINARY_NAME} flutter_assemble)
I tried to download cMake file from cMake.org and add it to system environment variables but it did not work or maybe I did it wrong

Gtest discover_tests failing in Github Actions: Process terminated due to timeout

I am using google-test(gtest) with CMake and running the unit tests as GitHub ci jobs for Linux and Mac. The Linux jobs pass successfully. However, I am getting an error for the mac runner.
The error is
CMake Error at /usr/local/Cellar/cmake/3.21.1/share/cmake/Modules/GoogleTestAddTests.cmake:77 (message):
Error running test executable.
Path: '/Users/runner/work/splitwebp/build/test/splitwebp_tests'
Result: Process terminated due to timeout
Output:
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.21.1/share/cmake/Modules/GoogleTestAddTests.cmake:173 (gtest_discover_tests_impl)
This is the CMakelists.txt for the tests directory
# CMake config file for unit tests
# Requiring V 3.10 for gtest_discover_tests
cmake_minimum_required(VERSION 3.10)
find_package(OpenCV REQUIRED)
enable_testing()
# finds all .cpp files under this directory (./test) and add them to executable
file(GLOB_RECURSE tests "*.cpp")
file(GLOB_RECURSE source "../src/*.cpp")
add_executable(splitwebp_tests ${tests} ${source})
include_directories("../3rdparty/libwebp/include")
# Link gtest libraries
target_link_libraries(splitwebp_tests ${OpenCV_LIBS})
target_link_libraries(splitwebp_tests webp webpdemux pthread)
target_link_libraries(splitwebp_tests gtest_main)
set(CTEST_OUTPUT_ON_FAILURE 1)
# Find all tests in all .cpp files and convert to CTests
include(GoogleTest)
gtest_discover_tests(splitwebp_tests)
How do I fix the CI pipeline?
The problem is gtest_discover_tests(...) is taking too long and thus getting timed out. The obvious solution is to increase the timeout limit.
The line
gtest_discover_tests(splitwebp_tests)
can be replaced with
gtest_discover_tests(splitwebp_tests PROPERTIES TIMEOUT 600)

Catkin_make on the velodyne drivers fails in the windows 10 environemnt

I am trying to install the ROS-Velodyne drivers(https://github.com/ros-drivers/velodyne) in windows to capture the point cloud from velodyne LiDAR but getting error while running catkin_make.
Since these drivers require pcap library, i installed WinPcap in my system and updated the cmake of velodyne driver to find the required headers and link the library.
But on running the cmake, i am getting error on "target_link_libraries" (image shown)
Cannot specify link libraries for target "velodyne_driver" which is not
built by this project
Following is the cmake file of velodyne_driver package:
cmake_minimum_required(VERSION 2.8.3)
project(velodyne_driver)
# Set minimum C++ standard to C++11
if (NOT "${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}")
message(STATUS "Changing CXX_STANDARD from C++98 to C++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif ("${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}" STREQUAL "98")
message(STATUS "Changing CXX_STANDARD from C++98 to C++11")
set(CMAKE_CXX_STANDARD 11)
endif()
set(${PROJECT_NAME}_CATKIN_DEPS
diagnostic_updater
dynamic_reconfigure
nodelet
roscpp
tf
velodyne_msgs)
find_package(catkin REQUIRED COMPONENTS ${${PROJECT_NAME}_CATKIN_DEPS} roslint)
# This driver uses Boost threads
find_package(Boost REQUIRED COMPONENTS thread)
# kinger: libpcap provides no pkg-config or find_package module:
#message (STATUS "****** Starting PCAP Search in folder: ********")
set( PCAP_DIR "C:/workspace/WpdPack" )
#message (STATUS ${PCAP_DIR})
#kinger: Include file FindPCAP.cmake
include(FindPCAP.cmake)
#find_package( PCAP REQUIRED )
message (STATUS "******* FIND PCAP TASK FINISHED **********")
message (STATUS ${PCAP_FOUND})
message (STATUS ${PCAP_INCLUDE_DIRS})
message (STATUS ${PCAP_LIBRARY_DIRS})
message (STATUS ${PCAP_LIBRARIES})
#set(libpcap_LIBRARIES -lpcap)
if(PCAP_FOUND)
# Include Directories
include_directories( ${PCAP_INCLUDE_DIRS} )
# Library Directories (Option)
link_directories( ${PCAP_LIBRARY_DIRS} )
# Dependencies
target_link_libraries( ${PROJECT_NAME} ${PCAP_LIBRARIES} )
endif()
include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS})
# Generate dynamic_reconfigure server
generate_dynamic_reconfigure_options(cfg/VelodyneNode.cfg)
# objects needed by other ROS packages that depend on this one
catkin_package(CATKIN_DEPENDS ${${PROJECT_NAME}_CATKIN_DEPS}
INCLUDE_DIRS include
LIBRARIES velodyne_input)
# compile the driver and input library
add_subdirectory(src/lib)
add_subdirectory(src/driver)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(FILES nodelet_velodyne.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
install(PROGRAMS src/vdump
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
roslint_cpp()
if (CATKIN_ENABLE_TESTING)
# these dependencies are only needed for unit testing
find_package(roslaunch REQUIRED)
find_package(rostest REQUIRED)
# Download packet capture (PCAP) files containing test data.
# Store them in devel-space, so rostest can easily find them.
catkin_download_test_data(
${PROJECT_NAME}_tests_class.pcap
http://download.ros.org/data/velodyne/class.pcap
DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/tests
MD5 65808d25772101358a3719b451b3d015)
catkin_download_test_data(
${PROJECT_NAME}_tests_32e.pcap
http://download.ros.org/data/velodyne/32e.pcap
DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/tests
MD5 e41d02aac34f0967c03a5597e1d554a9)
catkin_download_test_data(
${PROJECT_NAME}_tests_vlp16.pcap
http://download.ros.org/data/velodyne/vlp16.pcap
DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/tests
MD5 f45c2bb1d7ee358274e423ea3b66fd73)
# unit tests
add_rostest(tests/pcap_node_hertz.test)
add_rostest(tests/pcap_nodelet_hertz.test)
add_rostest(tests/pcap_32e_node_hertz.test)
add_rostest(tests/pcap_32e_nodelet_hertz.test)
add_rostest(tests/pcap_vlp16_node_hertz.test)
add_rostest(tests/pcap_vlp16_nodelet_hertz.test)
# parse check all the launch/*.launch files
roslaunch_add_file_check(launch)
# unit test
catkin_add_gtest(time_test tests/timeconversiontest.cpp)
target_link_libraries(time_test
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${PCAP_LIBRARIES})
endif (CATKIN_ENABLE_TESTING)
UPDATE: Resolved the above issue. It was related to target_link_libraries where we need to provide the "target" and not the "project". I updated the cmake by adding this line:
set(libpcap_LIBRARIES ${PCAP_LIBRARIES})
Now, the build fails at 59% with following error:
C:\opt\ros\noetic\x64\include\diagnostic_updater/update_functions.h(188): error C2589: 'constant': illegal token on right side of '::'
Looks like this is an open issue: https://github.com/ms-iot/ROSOnWindows/issues/280
I'm happy to see that you are using ROS on Windows! I'd love to know more about your project.
We (Azure Edge Robotics, who maintain ROS on Windows) don't currently have a Velodyne lidar, so have not attempted to port it.
It looks like the Velodyne Lidar ROS node has not been enabled on Windows. It looks like there are several linux specific commands in the cmake file which need windows equivalents.
We have a porting guide for Windows here - https://ms-iot.github.io/ROSOnWindows/GettingStarted/PortingANode.html
It there is a winpcap vcpkg which can be leveraged in the port:
https://github.com/microsoft/vcpkg/tree/master/ports/winpcap
I've created this on the ROSonWindows github to track:
Catkin_make on the velodyne drivers fails in the windows 10 environemnt

Building protobuf 3.9.4 on windows with cmake

I'm trying to build protobuf 3.9.4 on windows with cmake, but when i click 'configure', I get a message saying 'LINK : fatal error LNK1101: incorrect MSPDB140.DLL version; recheck installation of this product'.
Does anybody have any clue what's going on here?
Something's wrong with Visual Studio, most likely, but I'm not sure what.
I tried googling for solutions, but none of them relate to my problem.
P.S.
I'm using the gui version of cmake.
There is an useful example of CMake scripts patching needed to build protobuf 3.4.1 with Visual Studio 2017 using vcpkg.
#region PDFsharp - A .NET library for processing PDF
//
// Authors:
// Stefan Lange
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 7618ba2..d282a60 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
## -165,8 +165,10 ## endif (protobuf_UNICODE)
include(libprotobuf-lite.cmake)
include(libprotobuf.cmake)
-include(libprotoc.cmake)
-include(protoc.cmake)
+if(protobuf_BUILD_COMPILER)
+ include(libprotoc.cmake)
+ include(protoc.cmake)
+endif()
if (protobuf_BUILD_TESTS)
include(tests.cmake)
diff --git a/cmake/install.cmake b/cmake/install.cmake
index 441bf55..20b3aa0 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
## -1,14 +1,17 ##
include(GNUInstallDirs)
+set(LIBRARIES_TO_SET_DEST libprotobuf-lite libprotobuf)
+if(protobuf_BUILD_COMPILER)
+ list(APPEND LIBRARIES_TO_SET_DEST libprotoc)
+endif()
+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake
${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc #ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake
${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc #ONLY)
foreach(_library
- libprotobuf-lite
- libprotobuf
- libprotoc)
+ ${LIBRARIES_TO_SET_DEST})
set_property(TARGET ${_library}
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${protobuf_source_dir}/src>
## -19,8 +22,10 ## foreach(_library
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library})
endforeach()
-install(TARGETS protoc EXPORT protobuf-targets
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+if(protobuf_BUILD_COMPILER)
+ install(TARGETS protoc EXPORT protobuf-targets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+endif()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
## -101,7 +106,12 ## configure_file(protobuf-options.cmake
${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake #ONLY)
# Allows the build directory to be used as a find directory.
-export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc
+set(FIND_DIRS libprotobuf-lite libprotobuf)
+if(protobuf_BUILD_COMPILER)
+ list(APPEND FIND_DIRS libprotoc protoc)
+endif()
+
+export(TARGETS ${FIND_DIRS}
NAMESPACE protobuf::
FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake
)
Most probably easiest way to get 3.9.4 building is to upgrade original protobuf 3.4.1 vcpkg port. My experience with building C/C++ ports using vcpkg is a positive one so far.

find_path doesn't work if environment variable has spaces

I'm trying to make my cmake project automatically compile but I have some difficulties when my path contains spaces.
Here is my command line (windows command prompt)
C:\Code\codetrainerplugins-build>type %CODETRAINER_PATH%\include\common\exportapi.h
#pragma once
... the file is found ...
Here is my CMakeLists.txt file:
CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
PROJECT (CodeTrainerPlugins)
MESSAGE("$ENV{CODETRAINER_PATH}")
FIND_PATH (CODETRAINER_FRAMEWORK_PATH
NAMES include/common/ExportApi.h
PATHS
ENV CODETRAINER_PATH
)
if (CODETRAINER_FRAMEWORK_PATH)
MESSAGE(STATUS "CodeTrainer Framework found at: ${CODETRAINER_FRAMEWORK_PATH}")
else()
MESSAGE(FATAL_ERROR "CodeTrainer Framework not found")
endif()
ADD_SUBDIRECTORY(function)
ADD_SUBDIRECTORY(test)
Here is the output when CODETRAINER_PATH variable contains spaces (see the space in the path):
C:\Code\codetrainerplugins-build>echo %CODETRAINER_PATH%
"C:\Code Trainer"
C:\Code\codetrainerplugins-build>
C:\Code\codetrainerplugins-build>cmake ..\codetrainerplugins
-- Building for: Visual Studio 10
"C:\Code Trainer"
CMake Error at CMakeLists.txt:16 (MESSAGE):
CodeTrainer Framework not found
-- Configuring incomplete, errors occurred!
See also "C:/Code/codetrainerplugins-build/CMakeFiles/CMakeOutput.log".
C:\Code\codetrainerplugins-build>
But when the path used has no spaces everything works ok (see below):
C:\Code\codetrainerplugins-build>echo %CODETRAINER_PATH%
C:\CodeTrainer
C:\Code\codetrainerplugins-build>cmake ..\codetrainerplugins
C:\CodeTrainer
-- CodeTrainer Framework found at: C:/CodeTrainer
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Code/codetrainerplugins-build
C:\Code\codetrainerplugins-build>
Do you have any solution on how to solve this issue?
I am using cmake 2.8.12 for Windows.
Thanks,
Iulian
I must admit, I would have expected this to "just work" too, however it looks like it's actually the quotation marks in CODETRAINER_PATH when it has spaces that are the cause of the problem.
Either don't add quotes when defining the environment variable CODETRAINER_PATH, or modify your CMake code something like this:
STRING(REPLACE "\"" "" CODETRAINER_PATH_WITHOUT_QUOTES $ENV{CODETRAINER_PATH})
FIND_PATH(CODETRAINER_FRAMEWORK_PATH
NAMES include/common/ExportApi.h
PATHS ${CODETRAINER_PATH_WITHOUT_QUOTES}
)

Resources