[ https://issues.apache.org/jira/browse/THRIFT-4034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15830068#comment-15830068 ]
ASF GitHub Bot commented on THRIFT-4034: ---------------------------------------- Github user jeking3 commented on a diff in the pull request: https://github.com/apache/thrift/pull/1161#discussion_r96876857 --- Diff: compiler/cpp/CMakeLists.txt --- @@ -16,30 +16,30 @@ # specific language governing permissions and limitations # under the License. # +cmake_minimum_required(VERSION 2.8.12) + +set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/thrift/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/thrift/version.h) find_package(FLEX REQUIRED) find_package(BISON REQUIRED) # Create flex and bison files and build the lib parse static library -BISON_TARGET(thrifty ${CMAKE_CURRENT_SOURCE_DIR}/src/thrift/thrifty.yy ${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.cc) +BISON_TARGET(thrifty + ${CMAKE_CURRENT_SOURCE_DIR}/src/thrift/thrifty.yy + ${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.cc + DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/thrift/thrifty.h) --- End diff -- Nice addition of DEFINES_FILE so rebuilds are not triggered - I was wondering why successive build runs would rebuild the compiler - this is probably one fix for such a case. > CMake doesn't work to build compiler > ------------------------------------ > > Key: THRIFT-4034 > URL: https://issues.apache.org/jira/browse/THRIFT-4034 > Project: Thrift > Issue Type: Bug > Components: Compiler (General) > Affects Versions: 0.10.0 > Environment: macOS Sierra + CMake 3.7.2 > Reporter: Robert Lu > Assignee: Robert Lu > Labels: beginner > Fix For: 0.11.0 > > > AS > [document|https://github.com/apache/thrift/blob/0.10.0/compiler/cpp/README.md#build-compiler-using-cmake] > said. > When I ran {{cmake ..}} in {{/thrift/compiler/cpp/cmake-build}}, CMake > reports error as below: > {quote} > -- The C compiler identification is AppleClang 8.0.0.8000042 > -- The CXX compiler identification is AppleClang 8.0.0.8000042 > -- Check for working C compiler: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc > -- Check for working C compiler: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc > -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Detecting C compile features > -- Detecting C compile features - done > -- Check for working CXX compiler: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ > -- Check for working CXX compiler: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ > -- works > -- Detecting CXX compiler ABI info > -- Detecting CXX compiler ABI info - done > -- Detecting CXX compile features > -- Detecting CXX compile features - done > -- Found FLEX: /usr/bin/flex (found version "2.5.35") > -- Found BISON: /usr/local/bin/bison (found version "3.0.4") > CMake Error at CMakeLists.txt:152 (install): > install TARGETS given no RUNTIME DESTINATION for executable target > "thrift-compiler". > CMake Warning (dev) in CMakeLists.txt: > No cmake_minimum_required command is present. A line of code such as > cmake_minimum_required(VERSION 3.7) > should be added at the top of the file. The version specified may be lower > if you wish to support older CMake versions for this project. For more > information run "cmake --help-policy CMP0000". > This warning is for project developers. Use -Wno-dev to suppress it. > -- Configuring incomplete, errors occurred! > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)