Hello,

This is fairly long, but this is intentional. I message the "Invoking" message.

Invoking CMake: C:/Dev/CMake/bin/cmake.exe -G "Visual Studio 14 2015
Win64" -D 
CMAKE_CONFIGURATION_TYPES:STRING="Debug;Release;MinSizeRel;RelWithDebInfo"
-D 
CMAKE_INSTALL_PREFIX:STRING="G:/Source/Spikes/nanomsg/cppnngswig-testing/build/nng"
-D NNG_ENABLE_COVERAGE:BOOL=OFF -D NNG_ENABLE_DOC:BOOL=OFF -D
NNG_ENABLE_NNGCAT:BOOL=OFF -D NNG_ENABLE_TESTS:BOOL=OFF -D
NNG_ENABLE_TOOLS:BOOL=OFF -D NNG_ENABLE_ZEROTIER:BOOL=OFF

Prior to running:

execute_process (
    COMMAND "${CMAKE_COMMAND}" ${CPPNNG_NNG_CMAKE_OPTIONS}
    WORKING_DIRECTORY "${GIT_SUBMODULE_NNG_REPO_DIR}"
    RESULT_VARIABLE CPPNN_NNG_CONFIG_EC
    OUTPUT_VARIABLE CPPNN_NNG_CONFIG_MSG
)

Which is yielding:

CMake Error: The source directory
"G:/Source/Spikes/nanomsg/cppnngswig-testing/repos/nng/ -G "Visual
Studio 14 2015 Win64" -D
CMAKE_CONFIGURATION_TYPES:STRING="Debug;Release;MinSizeRel;RelWithDebInfo"
-D 
CMAKE_INSTALL_PREFIX:STRING="G:/Source/Spikes/nanomsg/cppnngswig-testing/build/nng"
-D NNG_ENABLE_COVERAGE:BOOL=OFF -D NNG_ENABLE_DOC:BOOL=OFF -D
NNG_ENABLE_NNGCAT:BOOL=OFF -D NNG_ENABLE_TESTS:BOOL=OFF -D
NNG_ENABLE_TOOLS:BOOL=OFF -D NNG_ENABLE_ZEROTIER:BOOL=OFF" does not
exist.

The GIT_SUBMODULE_NNG_REPO_DIR is indeed set to
G:/Source/Spikes/nanomsg/cppnngswig-testing/repos/nng/, so how can
that not be the source directory? But further, how is it seeing the
rest of the options as "source directory"?

I only got to this point by doing what seems like extreme string
gymnastics just to arrive at what I think is an appropriate command.

i.e.

macro (cppnng_nng_add_cmake_generator GEN)
    set (CPPNNG_NNG_CMAKE_OPTIONS "${CPPNNG_NNG_CMAKE_OPTIONS} -G \"${GEN}\"")
endmacro ()

macro (cppnng_nng_add_cmake_var OPT TYPE VALUE)
    set (CPPNNG_NNG_CMAKE_OPTIONS "${CPPNNG_NNG_CMAKE_OPTIONS} -D
${OPT}:${TYPE}=${VALUE}")
endmacro ()

    cppnng_nng_add_cmake_generator ("${CMAKE_GENERATOR}")

    # This is like string GYMNASTICS in order to allow semi-colons to
properly pass through.
    string(REPLACE ";" "\;" REPLACED_TYPES "${CMAKE_CONFIGURATION_TYPES}")
    cppnng_nng_add_cmake_var ("CMAKE_CONFIGURATION_TYPES" STRING
"\"${REPLACED_TYPES}\"")

    cppnng_nng_add_cmake_var ("CMAKE_INSTALL_PREFIX" STRING
"\"${cppnng_SOURCE_DIR}/build/nng\"")
    cppnng_nng_add_cmake_var ("NNG_ENABLE_COVERAGE" BOOL OFF)
    cppnng_nng_add_cmake_var ("NNG_ENABLE_DOC" BOOL OFF)
    cppnng_nng_add_cmake_var ("NNG_ENABLE_NNGCAT" BOOL OFF)
    cppnng_nng_add_cmake_var ("NNG_ENABLE_TESTS" BOOL OFF)
    cppnng_nng_add_cmake_var ("NNG_ENABLE_TOOLS" BOOL OFF)
    # TODO: TBD: at the moment we do not care about ZeroTier, but this
could change moving forward.
    cppnng_nng_add_cmake_var ("NNG_ENABLE_ZEROTIER" BOOL OFF)

    # message (FATAL_ERROR "options: ${CPPNNG_NNG_CMAKE_OPTIONS}")

    # message (STATUS "${REPLACED_TYPES}")

    message (STATUS "Invoking CMake: " "${CMAKE_COMMAND}"
${CPPNNG_NNG_CMAKE_OPTIONS})

Cheers,

Michael Powell
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to