[Lemon-user] Lemon for CLR
Stefan Knauf
Stefan.Knauf at Posteo.de
Fri Jan 27 23:24:02 CET 2017
Hi,
thanks for searching!
Before I tried to build the Lemon Library, I never had tried to use
CMake. Please excuse my huge inexpertness.
Even I had found the second page that you mentioned. But the explanation
there is too short for me. I copied and pasted that code into the
CMakeLists.txt. I pasted it behind the PROJECT-definition:
[...]
SET(PROJECT_NAME "LEMON")
PROJECT(${PROJECT_NAME})
set_target_properties(${PROJECT_NAME} PROPERTIES VS_DOTNET_REFERENCES
"System;System.Core;System.Data;System.Drawing;System.Xml;WindowsBase")
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/clr
/EHa")
set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX "d")
if(CMAKE_CXX_FLAGS_DEBUG MATCHES "/RTC1")
string(REPLACE "/RTC1" " " CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG}")
endif()
if(CMAKE_CXX_FLAGS MATCHES "/EHsc")
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
INCLUDE(FindPythonInterp)
INCLUDE(FindWget)
[...]
I got the following output:
C:\[...]\lemon-1.3.1\build>cmake .. -G "Visual Studio 14"
-- The C compiler identification is MSVC 19.0.23506.0
-- The CXX compiler identification is MSVC 19.0.23506.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft
Visual Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft
Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:8 (set_target_properties):
set_target_properties Can not find target to add properties to: LEMON
CMake Error at CMakeLists.txt:9 (set_target_properties):
set_target_properties Can not find target to add properties to: LEMON
CMake Error at CMakeLists.txt:10 (set_target_properties):
set_target_properties Can not find target to add properties to: LEMON
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
-- Could NOT find Wget (missing: WGET_EXECUTABLE)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find Ghostscript (missing: GHOSTSCRIPT_EXECUTABLE)
-- Could NOT find GLPK (missing: GLPK_LIBRARY GLPK_INCLUDE_DIR
GLPK_PROPER_VERSION_FOUND) (Required is at least version "4.33")
-- Could NOT find ILOG (missing: ILOG_CPLEX_LIBRARY
ILOG_CPLEX_INCLUDE_DIR)
-- Could NOT find COIN (missing: COIN_INCLUDE_DIR COIN_CBC_LIBRARY
COIN_CBC_SOLVER_LIBRARY COIN_CGL_LIBRARY COIN_CLP_LIBRARY
COIN_COIN_UTILS_LIBRARY COIN_OSI_LIBRARY COIN_OSI_CBC_
LIBRARY COIN_OSI_CLP_LIBRARY)
-- Could NOT find SOPLEX (missing: SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR)
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Copy doc from source tree
-- Configuring incomplete, errors occurred!
Hence I know that the project is not the right target and/or I pasted
the stuff into the wrong place. But unfortunately I don't know how it
works right.
Best regards
Stefan
Am 26.01.2017 12:52 schrieb Alpar Juttner:
> Hi,
>
> Compiling LEMON to native code using Visual Studio works well following
> the instruction found at
> http://lemon.cs.elte.hu/trac/lemon/wiki/InstallCmake
>
> I'm not familiar to CLR, but I found this somewhat related link post on
> stackoverflow:
> http://stackoverflow.com/questions/12503229/c-cli-and-cmake
>
> Could you share some details on what you exactly tried?
>
> Regards,
> Alpar
More information about the Lemon-user
mailing list